﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="X.WebSite.Admin.Product.List" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    产品列表<a href="Detail.aspx">新增</a>
    <asp:GridView ID="gvProductList" runat="server" AutoGenerateColumns="False" EnableModelValidation="True"
        OnRowDeleting="gvProductList_RowDeleting" DataKeyNames="ProductId">
        <Columns>
            <asp:BoundField HeaderText="产品名称" DataField="ProductName" HtmlEncode="false" />
            <asp:BoundField HeaderText="产品类别" DataField="CategoryName" HtmlEncode="false" />
            <asp:BoundField HeaderText="价格" DataField="Price" />
            <asp:TemplateField HeaderText="热销/推荐/状态/特殊">
                <ItemTemplate>
                    <%# Convert.ToBoolean(Eval("IsHotProduct"))?"是":"否" %>/
                    <%# Convert.ToBoolean(Eval("IsRecommendatory")) ? "是" : "否"%>/
                    <%# Convert.ToBoolean(Eval("IsAvailable")) ? "上架" : "下架"%>/
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="T,K,D,PD">
                <ItemTemplate>
                    <%# string.Empty == Convert.ToString(Eval("Title")) ? "×" : "√"%>
                    <%#string.Empty == Convert.ToString(Eval("Keyword")) ? "×" : "√"%>
                    <%# string.Empty == Convert.ToString(Eval("ProductDescribe")) ? "×" : "√"%>
                    <%# string.Empty == Convert.ToString(Eval("Description")) ? "×" : "√"%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:HyperLinkField DataNavigateUrlFields="ProductId" DataNavigateUrlFormatString="Detail.aspx?ProductId={0}"
                HeaderText="编辑" Text="编辑" />
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
    </asp:GridView>
    </form>
</body>
</html>
